/**
 * 矩形模式的类
 */
rectOper.prototype = new graphOper() ;
function rectOper(manager){
	this.init(manager) ;
	this.manager=manager ;
}
rectOper.prototype.mouseDown = function(){
	try{
		this.manager.tmpObj = new rect() ;
		this.updatePos() ;
	}catch(e){alert(e.message)}
}

/**
 * 矩形类
 */
rect.prototype = new graph() ;
function rect(){}
rect.prototype.paint = function(printer){
	try{
		printer.moveTo(this.x , this.y) ;
		printer.lineTo(this.x, this.ey) ;
		printer.lineTo(this.ex, this.ey) ;
		printer.lineTo(this.ex, this.y) ;
		printer.lineTo(this.x, this.y) ;
	}catch(e){alert(e.message)}
}